<?php
/*
 * Copyright (c) 2017-2025 Tencent. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
namespace TencentCloud\Trocket\V20230308\Models;
use TencentCloud\Common\AbstractModel;

/**
 * DescribeMessage response structure.
 *
 * @method string getBody() Obtain Message body.
 * @method void setBody(string $Body) Set Message body.
 * @method string getProperties() Obtain Detailed parameters.
 * @method void setProperties(string $Properties) Set Detailed parameters.
 * @method string getProduceTime() Obtain Production time.
 * @method void setProduceTime(string $ProduceTime) Set Production time.
 * @method string getMessageId() Obtain Message ID.
Note: This field may return null, indicating that no valid values can be obtained.
 * @method void setMessageId(string $MessageId) Set Message ID.
Note: This field may return null, indicating that no valid values can be obtained.
 * @method string getProducerAddr() Obtain Producer address.
 * @method void setProducerAddr(string $ProducerAddr) Set Producer address.
 * @method array getMessageTracks() Obtain List of message consumption situations.
Note: This field may return null, indicating that no valid values can be obtained.
 * @method void setMessageTracks(array $MessageTracks) Set List of message consumption situations.
Note: This field may return null, indicating that no valid values can be obtained.
 * @method string getShowTopicName() Obtain Topic name
 * @method void setShowTopicName(string $ShowTopicName) Set Topic name
 * @method integer getMessageTracksCount() Obtain Total number of items in the message consumption status list.
Note: This field may return null, indicating that no valid values can be obtained.
 * @method void setMessageTracksCount(integer $MessageTracksCount) Set Total number of items in the message consumption status list.
Note: This field may return null, indicating that no valid values can be obtained.
 * @method string getRequestId() Obtain The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
 * @method void setRequestId(string $RequestId) Set The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
 */
class DescribeMessageResponse extends AbstractModel
{
    /**
     * @var string Message body.
     */
    public $Body;

    /**
     * @var string Detailed parameters.
     */
    public $Properties;

    /**
     * @var string Production time.
     */
    public $ProduceTime;

    /**
     * @var string Message ID.
Note: This field may return null, indicating that no valid values can be obtained.
     */
    public $MessageId;

    /**
     * @var string Producer address.
     */
    public $ProducerAddr;

    /**
     * @var array List of message consumption situations.
Note: This field may return null, indicating that no valid values can be obtained.
     */
    public $MessageTracks;

    /**
     * @var string Topic name
     */
    public $ShowTopicName;

    /**
     * @var integer Total number of items in the message consumption status list.
Note: This field may return null, indicating that no valid values can be obtained.
     */
    public $MessageTracksCount;

    /**
     * @var string The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
     */
    public $RequestId;

    /**
     * @param string $Body Message body.
     * @param string $Properties Detailed parameters.
     * @param string $ProduceTime Production time.
     * @param string $MessageId Message ID.
Note: This field may return null, indicating that no valid values can be obtained.
     * @param string $ProducerAddr Producer address.
     * @param array $MessageTracks List of message consumption situations.
Note: This field may return null, indicating that no valid values can be obtained.
     * @param string $ShowTopicName Topic name
     * @param integer $MessageTracksCount Total number of items in the message consumption status list.
Note: This field may return null, indicating that no valid values can be obtained.
     * @param string $RequestId The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
     */
    function __construct()
    {

    }

    /**
     * For internal only. DO NOT USE IT.
     */
    public function deserialize($param)
    {
        if ($param === null) {
            return;
        }
        if (array_key_exists("Body",$param) and $param["Body"] !== null) {
            $this->Body = $param["Body"];
        }

        if (array_key_exists("Properties",$param) and $param["Properties"] !== null) {
            $this->Properties = $param["Properties"];
        }

        if (array_key_exists("ProduceTime",$param) and $param["ProduceTime"] !== null) {
            $this->ProduceTime = $param["ProduceTime"];
        }

        if (array_key_exists("MessageId",$param) and $param["MessageId"] !== null) {
            $this->MessageId = $param["MessageId"];
        }

        if (array_key_exists("ProducerAddr",$param) and $param["ProducerAddr"] !== null) {
            $this->ProducerAddr = $param["ProducerAddr"];
        }

        if (array_key_exists("MessageTracks",$param) and $param["MessageTracks"] !== null) {
            $this->MessageTracks = [];
            foreach ($param["MessageTracks"] as $key => $value){
                $obj = new MessageTrackItem();
                $obj->deserialize($value);
                array_push($this->MessageTracks, $obj);
            }
        }

        if (array_key_exists("ShowTopicName",$param) and $param["ShowTopicName"] !== null) {
            $this->ShowTopicName = $param["ShowTopicName"];
        }

        if (array_key_exists("MessageTracksCount",$param) and $param["MessageTracksCount"] !== null) {
            $this->MessageTracksCount = $param["MessageTracksCount"];
        }

        if (array_key_exists("RequestId",$param) and $param["RequestId"] !== null) {
            $this->RequestId = $param["RequestId"];
        }
    }
}
